package ldkxingzhe.l365calendar.fragment;

import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import ldkxingzhe.l365calendar.R;
import ldkxingzhe.l365calendar.activity.AlertActivity;

/**
 * Created by ke on 16-1-26.
 */
public class MainDiscovery extends Fragment {
    @SuppressWarnings("unused")
    private static final String TAG = "DiscoveryFragment";

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View resultView = inflater.inflate(R.layout.fragment_main_discovery, container, false);
        resultView.findViewById(R.id.button).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(getActivity(), AlertActivity.class);
                intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY);
                startActivity(intent);
            }
        });
        return resultView;
    }
}
